<template>
  <div class="page pd" style="position: relative;">
    <div @tap="onPreview"><image src="/static/img/contact.png" mode="widthFix"></image></div>
    <div style="position: absolute;right: 30px;top: 30px;">
      <a @tap="onSave">保存图片</a>
    </div>
    <page-common></page-common>
  </div>
</template>

<script>
import PageCommon from '@/components/page-common'

export default {
  components: {
    PageCommon
  },
  methods: {
    onSave () {
      let that = this
      wx.saveImageToPhotosAlbum({
        filePath: '/static/img/contact.png',
        success(res) {
          that.$store.commit('UI_SET_TOAST_SUCCESS_MSG', '保存成功！')
        },
      })
    },
    onPreview () {
      let url = 'https://ark-1256750454.picsh.myqcloud.com/app-statics/contact.png'
      wx.previewImage({
        urls: [url]
      })
    }
  }
}
</script>

<style scoped lang="less">
</style>
